This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
facesContext.getReponse().getOutputStream() throws the following exception:
java.lang.IllegalStateException: Can't get an OutputStream while a Writer is already in use
So I cannot see any way of getting an Stream rather than a Writer.
I was trying to get Ed Wissels technique to work to allow xpages to return binary as this is something I would dearly like to have for my current project. I can't see how it's possible.
I also have a problem with any xpage Java placed in WebContent/WEB_INF being cached permanently and needing a server restart.
Anyone have any experience with the ResponseStream objects? The ResponseWriter works fine but handles only text.
No love for xpages yet!
S
EDIT: I am using this code in the afterRenderReponse event.
var rs = facesContext.getResponseStream();
var rw = facesContext.getResponseWriter();
if(rs == null ) {
rw.write("stream == null");
} else {
rw.write("we have a stream");
}
Always outputs stream == null
Sounds to me like the xpage system is always instantiating the PrintWriter object even when all rendering is turned off and this blocks any attempt at getting at the OutputStream.
I have tried closing/flushing/ending/null'ing the ResponseWriter object, but nothing seems to work.
Feedback number WEBB7RS34C created by ~George Chugeroveroden on 05/06/2009
Status: Open
Comments: